package cn.shyouchi.wuguanjia.android.ui.attendance.report;

import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import cn.shyouchi.wuguanjia.android.R;
import cn.shyouchi.wuguanjia.android.base.BaseActivity;
import cn.shyouchi.wuguanjia.android.widget.TopBar;

public class StaffReportInfoActivity extends BaseActivity {

    @BindView(R.id.topBar)
    TopBar mTopBar;
    @BindView(R.id.tv_report_time)
    TextView mTvReportTime;
    @BindView(R.id.tv_report_time_diff)
    TextView mTvReportTimeDiff;
    @BindView(R.id.tv_report_rank)
    TextView mTvReportRank;
    @BindView(R.id.tv_report_post)
    TextView mTvReportPost;
    @BindView(R.id.tv_report_content)
    TextView mTvReportContent;


    StaffReportEntity.ResultMessageBean.PlanBean mPlanBean;
    StaffReportEntity.ResultMessageBean.DataBean mDataBean;

    @Override
    public int initContentView() {
        return R.layout.activity_staff_report_info;
    }

    @Override
    public void initInjector() {
        mPlanBean = getIntent().getParcelableExtra("reportinfo");
        mDataBean = getIntent().getParcelableExtra("datainfo");


    }

    @Override
    public void initUiAndListener() {
        ButterKnife.bind(this);
        mTopBar.setTitle(getTitle().toString());
        mTopBar.setLeftIcon(R.mipmap.ic_back);
        setSupportActionBar(mTopBar.getToolbar());

        if (mPlanBean != null) {
            mTvReportTime.setText(mPlanBean.getTime());
        }

        if (mDataBean != null) {
            mTvReportTimeDiff.setText(mDataBean.getPostsetting().getJetlag());
            mTvReportRank.setText(mDataBean.getPostsetting().getService());
            mTvReportPost.setText(mDataBean.getPostsetting().getPostsetting_name());
            mTvReportContent.setText(mDataBean.getPostsetting().getPostsetting_info());
        }


    }

    @Override
    protected boolean isApplyStatusBarTranslucency() {
        return false;
    }

    @Override
    protected boolean isApplyStatusBarColor() {
        return true;
    }

}
